package com.libl.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_user")
@Component//使用注解创建bean对象
public class User {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String userName;
    private String password;
    private String name;
    @TableField("nianling")//解决java对象属性名称与表字段名称不一致的情况
    private Integer age;
    private String email;

    @TableField(exist = false)//默认为true  使用false可以忽略此属性
    private String address;

}